import { createApp } from 'vue';
import App from './App.vue';
import  ElementPlus from 'element-plus';
import 'element-plus/theme-chalk/index.css';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import {createRouter, createWebHistory} from "vue-router";
import { createPinia } from 'pinia'
import routes from "./router/all_router";

const router = createRouter({
    history: createWebHistory(),
    routes,
});

const pinia = createPinia();

const app = createApp(App);
app.use(pinia);
app.use(router).use(ElementPlus);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}

app.mount('#app');
